<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Model;

/**
 * Class DefaultArticle
 */
class Article extends Model
{
    protected $table = 'article';

    protected $primaryKey = 'article_id';

	public $timestamps = true;

    protected $fillable = [
        'article_title',
        'article_class_id',
        'article_origin',
        'article_origin_address',
        'article_author',
        'article_abstract',
        'article_content',
        'article_image',
        'article_keyword',
        'article_link',
        'article_publish_time',
        'article_click',
        'article_sort',
        'article_state',
        'article_attachment_path',
        'article_image_all',
        'article_modify_time',
        'article_tag',
        'article_title_short',
        'article_commend_image_flag',
        'article_share_count'
    ];

    protected $guarded = [];

    /**
     * @param \DateTime|int $value
     * @return false|int
     * @author dividez
     */
    public function fromDateTime($value){
        return strtotime(parent::fromDateTime($value));
    }
        
}